package de.obs.mvl.gui;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class Window_Contents extends JPanel{

	/**
	 * 
	 */
	private static final long serialVersionUID = -6776359759087287206L;
	private JButton btn_createXML,
					btn_close,
					btn_createHTML;
	private JLabel lbl_title,
				   lbl_close,
				   lbl_xmlCreate,
				   lbl_htmlCreate,
				   lbl_bottom_status;
	private Window_ActionListener al;
	private static Window_Contents instance = null;
	
	public JLabel getLbl_title() {
		return lbl_title;
	}

	public void setLbl_title(JLabel lbl_title) {
		this.lbl_title = lbl_title;
	}


	
	private Window_Contents(){
		al = new Window_ActionListener();
		this.setLayout(null);
		
		btn_createXML = new JButton("OK");
		btn_createXML.setBounds(5, 50, 100, 30);
		btn_createXML.setActionCommand("xml_create");
		btn_createXML.addActionListener(al);
		
		btn_createHTML = new JButton("OK");
		btn_createHTML.setBounds(5, 120, 120, 30);
		btn_createHTML.setActionCommand("html_create");
		btn_createHTML.addActionListener(al);
		btn_createHTML.setEnabled(false);
	
		btn_close = new JButton("Close");
		btn_close.setBounds(5, 200, 100, 30);
		btn_close.setActionCommand("Close");
		btn_close.addActionListener(al);
		
		lbl_title = new JLabel();
		lbl_title.setText("MVLForPCH");
		lbl_title.setBounds(220, 5, 100, 30);
		
		lbl_xmlCreate = new JLabel();
		lbl_xmlCreate.setText("Create XML");
		lbl_xmlCreate.setBounds(20, 25, 100, 30);
		
		lbl_htmlCreate = new JLabel();
		lbl_htmlCreate.setText("Create HTML");
		lbl_htmlCreate.setBounds(20, 100, 100, 30);
		
		lbl_bottom_status = new JLabel();
		lbl_bottom_status.setText("");
		lbl_bottom_status.setBounds(220, 200, 100, 30);
		
		lbl_close = new JLabel();
		lbl_close.setText("Close App");
		lbl_close.setBounds(20, 180, 100, 30);
		
		this.add(btn_createXML);
		this.add(btn_close);
		this.add(btn_createHTML);
		this.add(lbl_title);
		this.add(lbl_close);
		this.add(lbl_xmlCreate);
		this.add(lbl_htmlCreate);
		this.add(lbl_bottom_status);
	}
	
	public JButton getBtn_html_create() {
		return btn_createHTML;
	}

	public JLabel getLbl_bottom_status() {
		return lbl_bottom_status;
	}

	public void setLbl_bottom_status(JLabel lbl_bottom_status) {
		this.lbl_bottom_status = lbl_bottom_status;
	}

	public static Window_Contents getContent(){
		
        if (instance == null) {

            instance = new Window_Contents();

        }

        return instance;


	}
	

}
